<?php

/**
 * Created by PhpStorm.
 * User: yf
 * Date: 2018/3/6
 * Time: 上午11:41
 */
namespace App\HttpController;

use FastRoute\RouteCollector;

class Router extends \EasySwoole\Core\Http\AbstractInterface\Router {
	function register(RouteCollector $routeCollector) {
		// TODO: Implement register() method.
		// 路由拦截若未执行end，请求还会继续进入系统自带的控制器路由匹配
		$routeCollector->get ( '/register', '/Api/Common/register' );
		$routeCollector->get ( '/login', '/Api/Common/login' );
		$routeCollector->get ( '/checkIsLogin', '/Api/Common/checkIsLogin' );
		$routeCollector->get ( '/getFriendRequests', '/Api/Friend/getFriendRequests' );
		$routeCollector->get ( '/dealFriendRequest', '/Api/Friend/dealFriendRequest' );
		$routeCollector->get ( '/getFriendList', '/Api/Friend/getFriendList' );
		$routeCollector->post ( '/posttest', '/Api/Upload/test' );
	}
}